package org.byqh.dqeai.config;

import org.springdoc.core.customizers.PropertyCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SpringDocConfig {

    @Bean
    public PropertyCustomizer propertyCustomizer() {
        return (schema, type) -> {
            // 设置当前属性的 nullable 默认值为 true（仅当未显式设置时）
            if (schema.getNullable() == null) {
                schema.setNullable(true);
            }
            return schema;
        };
    }
}